|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectagents.anac.y2011.HardHeaded.BidHistory
public class BidHistory
Keeps track of all bids exchanged by both the agent and its opponent. Also has some tools that work on history of exchanged bids.
| Constructor Summary | |
|---|---|
BidHistory(UtilitySpace utilSpace)
BidHistory class constructor. |
|
| Method Summary | |
|---|---|
void |
addMyBid(java.util.Map.Entry<java.lang.Double,Bid> pBid)
Adds a new bid Map.Entry to the end of agent's own bids. |
void |
addOpponentBid(Bid pBid)
Adds a new bid Map.Entry to the end of oppenent's bids. |
java.util.HashMap<java.lang.Integer,java.lang.Integer> |
BidDifference(Bid first,
Bid second)
receives two bids as arguments and returns a HashMap that contains
for each issue whether or not its value is different between the
two bids. |
java.util.HashMap<java.lang.Integer,java.lang.Integer> |
BidDifferenceofOpponentsLastTwo()
For the last two bids of the opponent returns a HashMap
that contains for each issue whether or not its value
is different between the two bids. |
java.util.Map.Entry<java.lang.Double,Bid> |
getMyBid(int pIndex)
retrieves a bid Map.Entry from the agent's bid list |
int |
getMyBidCount()
|
java.util.Map.Entry<java.lang.Double,Bid> |
getMyLastBid()
retrieves last bid Map.Entry from the agent's bid list |
Bid |
getOpponentBid(int pIndex)
retrieves a bid from the opponent's bid list |
int |
getOpponentBidCount()
|
Bid |
getOpponentLastBid()
retrieves last bid from the opponent's bid list |
Bid |
getOpponentSecondLastBid()
retrieves second last bid from the opponent's bid list |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public BidHistory(UtilitySpace utilSpace)
utilSpace - a UtilitySpace to be set for utility calculations of stored bids.| Method Detail |
|---|
public void addMyBid(java.util.Map.Entry<java.lang.Double,Bid> pBid)
Map.Entry to the end of agent's own bids.
pBid - passed bid entrypublic int getMyBidCount()
public java.util.Map.Entry<java.lang.Double,Bid> getMyBid(int pIndex)
Map.Entry from the agent's bid list
pIndex - index of the bid
public java.util.Map.Entry<java.lang.Double,Bid> getMyLastBid()
Map.Entry from the agent's bid list
public void addOpponentBid(Bid pBid)
Map.Entry to the end of oppenent's bids.
pBid - passed bid entrypublic int getOpponentBidCount()
public Bid getOpponentBid(int pIndex)
pIndex - index of the bid
public Bid getOpponentLastBid()
public Bid getOpponentSecondLastBid()
public java.util.HashMap<java.lang.Integer,java.lang.Integer> BidDifference(Bid first,
Bid second)
HashMap that contains
for each issue whether or not its value is different between the
two bids.
first - second -
HashMap with keys equal to issue IDs and with values 1 if different issue value observed and 0 if not.public java.util.HashMap<java.lang.Integer,java.lang.Integer> BidDifferenceofOpponentsLastTwo()
HashMap
that contains for each issue whether or not its value
is different between the two bids.
HashMap with keys equal to issue IDs and with values 1 if different issue value observed and 0 if not.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||